package com.easy.query.test.entity.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.Blog2Entity;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLIntegerTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLocalDateTimeTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLBooleanTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class Blog2EntityProxy extends AbstractProxyEntity<Blog2EntityProxy, Blog2Entity> {

    private static final Class<Blog2Entity> entityClass = Blog2Entity.class;

    public static final Blog2EntityProxy TABLE = createTable().createEmpty();

    public static Blog2EntityProxy createTable() {
        return new Blog2EntityProxy();
    }

    public Blog2EntityProxy() {
    }

    /**
     * 标题
     * {@link Blog2Entity#getTitle}
     */
    public SQLStringTypeColumn<Blog2EntityProxy> title() {
        return getStringTypeColumn("title");
    }

    /**
     * 点赞数
     * {@link Blog2Entity#getStar}
     */
    public SQLIntegerTypeColumn<Blog2EntityProxy> star() {
        return getIntegerTypeColumn("star");
    }

    /**
     * {@link Blog2Entity#getStarStr}
     */
    public SQLStringTypeColumn<Blog2EntityProxy> starStr() {
        return getStringTypeColumn("starStr");
    }

    /**
     * {@link Blog2Entity#getId}
     */
    public SQLStringTypeColumn<Blog2EntityProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * 创建时间;创建时间
     * {@link Blog2Entity#getCreateTime}
     */
    public SQLLocalDateTimeTypeColumn<Blog2EntityProxy> createTime() {
        return getLocalDateTimeTypeColumn("createTime");
    }

    /**
     * 修改时间;修改时间
     * {@link Blog2Entity#getUpdateTime}
     */
    public SQLLocalDateTimeTypeColumn<Blog2EntityProxy> updateTime() {
        return getLocalDateTimeTypeColumn("updateTime");
    }

    /**
     * 创建人;创建人
     * {@link Blog2Entity#getCreateBy}
     */
    public SQLStringTypeColumn<Blog2EntityProxy> createBy() {
        return getStringTypeColumn("createBy");
    }

    /**
     * 修改人;修改人
     * {@link Blog2Entity#getUpdateBy}
     */
    public SQLStringTypeColumn<Blog2EntityProxy> updateBy() {
        return getStringTypeColumn("updateBy");
    }

    /**
     * 是否删除;是否删除
     * {@link Blog2Entity#getDeleted}
     */
    public SQLBooleanTypeColumn<Blog2EntityProxy> deleted() {
        return getBooleanTypeColumn("deleted");
    }


    @Override
    public Class<Blog2Entity> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public Blog2EntityProxyFetcher FETCHER = new Blog2EntityProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class Blog2EntityProxyFetcher extends AbstractFetcher<Blog2EntityProxy, Blog2Entity, Blog2EntityProxyFetcher> {

        public Blog2EntityProxyFetcher(Blog2EntityProxy proxy, Blog2EntityProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * 标题
         * {@link Blog2Entity#getTitle}
         */
        public Blog2EntityProxyFetcher title() {
            return add(getProxy().title());
        }

        /**
         * 点赞数
         * {@link Blog2Entity#getStar}
         */
        public Blog2EntityProxyFetcher star() {
            return add(getProxy().star());
        }

        /**
         * {@link Blog2Entity#getStarStr}
         */
        public Blog2EntityProxyFetcher starStr() {
            return add(getProxy().starStr());
        }

        /**
         * {@link Blog2Entity#getId}
         */
        public Blog2EntityProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * 创建时间;创建时间
         * {@link Blog2Entity#getCreateTime}
         */
        public Blog2EntityProxyFetcher createTime() {
            return add(getProxy().createTime());
        }

        /**
         * 修改时间;修改时间
         * {@link Blog2Entity#getUpdateTime}
         */
        public Blog2EntityProxyFetcher updateTime() {
            return add(getProxy().updateTime());
        }

        /**
         * 创建人;创建人
         * {@link Blog2Entity#getCreateBy}
         */
        public Blog2EntityProxyFetcher createBy() {
            return add(getProxy().createBy());
        }

        /**
         * 修改人;修改人
         * {@link Blog2Entity#getUpdateBy}
         */
        public Blog2EntityProxyFetcher updateBy() {
            return add(getProxy().updateBy());
        }

        /**
         * 是否删除;是否删除
         * {@link Blog2Entity#getDeleted}
         */
        public Blog2EntityProxyFetcher deleted() {
            return add(getProxy().deleted());
        }


        @Override
        protected Blog2EntityProxyFetcher createFetcher(Blog2EntityProxy cp, AbstractFetcher<Blog2EntityProxy, Blog2Entity, Blog2EntityProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new Blog2EntityProxyFetcher(cp, this, sqlSelectExpression);
        }
    }

}
